<?php
function reequipment_user_menu()
{
	if (!xarSecurityCheck('EditEquipment', 1)) return;
	if (!xarVarFetch('equipment_id', 'int:1:', $equipment_id, '', XARVAR_NOT_REQUIRED)) return;    
    $data = array();
    $company_id = xarSessionGetVar('company_id');
    if (isset($company_id)){
   		$data['equipment'] = xarModAPIFunc('reequipment', 'user', 'getequipment', array('company_id' => $company_id)); 
   		foreach ($data['equipment'] as $key => $var){
   			if ($data['equipment'][$key]['equipment_id'] == $equipment_id){
   				$data['equipment'][$key]['style'] = 'style="font-weight: bold"';
   			} else {
   				$data['equipment'][$key]['style'] = '';
   			}
   		}
   	} else {
   		$data['equipment'] = array();
   	}
    return $data;
}

?>